<?php
require_once(".././controller/banco.php");

session_start();

echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" 
  "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <title>
      menu
    </title>
    <link rel="Stylesheet" href="./css/sisconc.css" type="text/css" />
    <script type="text/javascript" src="./js/sisconc.js">
    </script>
  </head>
  <body>
    <div class="box">
<?php
if(($_SESSION["login"] == 0) && (isset($_SESSION["login"])))
  {
  echo "<div class=\"alert\">Usu&aacute;rio n&atilde;o cadastrado ou senha inv&aacute;lida</div>\n";
  }
?>
      <form method="post" action="menu.php">
        <fieldset>
	  <legend>
            <img src="./img/logo.jpg" alt="logotipo" />
	  </legend>
	  <div id="textos">
            <label for="usuario">Usu&aacute;rio:</label>
	    <br />
            <label for="senha">Senha:</label>
	    <br />
            <label for="departamento">Departamento:</label>
	  </div>
	  <div id="entradas">
	    <input type="text" name="usuario" id="usuario" tabindex="1" />
	    <br />
            <input type="password" name="senha" id="senha" tabindex="2" />
            <br />
            <select name="departamento" id="departamento" tabindex="3" >
<?php
$banco = new BANCO();
				
$vetortemporario = $banco->ExecutaSQL("SELECT nome, sigla FROM departamento ORDER BY nome;");
for($x = 0; $x < $banco->RetornaQuantidadeLinhas() ; $x++) 
  {
  echo "              <option value=\"" . $vetortemporario[$x][0] .  "\">" . $vetortemporario[$x][1] . " - " . $vetortemporario[$x][0] . "</option>\n";   
  }
?>
            </select>
            <br />
            <input type="submit" name="Submit" value="Logar" tabindex="4" />
	  </div>
	</fieldset>
      </form>
    </div>
    <div class="box">
      <a href="http://validator.w3.org/check?uri=referer">
        <img src="./img/valid-xhtml11-blue.png" alt="Valid XHTML 1.1 Basic" height="31" width="88" />
      </a>
      <a href="http://jigsaw.w3.org/css-validator/check/referer">
        <img src="./img/valid-css2-blue.png" alt="Valid CSS!" />
      </a>
	  </fieldset>
    </div>
  </body>
</html>
